package com.guguskins.back.mapper;

import com.guguskins.back.entity.GuBox;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 盲盒 Mapper 接口
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-05-14
 */
@Repository
public interface GuBoxMapper extends BaseMapper<GuBox> {

    List<GuBox> listByCategoryId(Long categoryId);

    GuBox getBox(Long boxId);

    List<GuBox> getBoxes(Integer boxType);

    List<GuBox> getBackPageData(@Param("index") int index, @Param("size") int size, @Param("category") int category, @Param("state") int state, @Param("type") int type, @Param("searchKey") String searchKey);

    long getBackPageTotal(@Param("category") int category, @Param("state") int state, @Param("type") int type, @Param("searchKey") String searchKey);
}
